package homeworke.qusetion22;

/**
 * Author：毕龙
 * Date: 2024/4/18 20:20
 */
public class HourEmployee extends Employee {
    private double hourSalary;
    private int hours;

    public double getHourSalary() {
        return hourSalary;
    }

    public void setHourSalary(double hourSalary) {
        this.hourSalary = hourSalary;
    }

    public int getHours() {
        return hours;
    }

    public void setHours(int hours) {
        this.hours = hours;
    }

    @Override
    public double getSalary(int month) {
        return super.getSalary(month)+ (hours>160?hourSalary*1.5*(hours-160)+hourSalary*160:hours*hourSalary);
    }
}
